package com.lyz.dataStructure.JianZhiOffer.Tree;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 21:50
 * @Description:
 **/

import java.util.ArrayList;
import java.util.List;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/7/4 21:50
 *@Description:
 **/

 class TreeNode {
    int val = 0;
    TreeNode left = null;
    TreeNode right = null;
    public TreeNode(int val) {
        this.val = val;

    }

}
public class Test {
    public static void main(String[] args) {
        TreeNode treeNode =new TreeNode(10);
        System.out.println(treeNode.val);

    }
    public static int TreeDepth(TreeNode root) {
        if(root==null){
            return 0;
        }
        int left_dep =TreeDepth(root.left);
        int right_dep =TreeDepth(root.right);
        return Math.max(left_dep,right_dep)+1;
    }
}
